<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow-IPC: session/sync_io/detail/session_adapter.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow-IPC<span id="projectnumber">&#160;1.0.2</span>
   </div>
   <div id="projectbrief">Flow-IPC project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_938858dd290fe54e59e3500689c41d32.html">session</a></li><li class="navelem"><a class="el" href="dir_c7ea703034e45a505e1ea635ef215d07.html">sync_io</a></li><li class="navelem"><a class="el" href="dir_5f6beb94f407c5622d999c27bb1c02fe.html">detail</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">session_adapter.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="session__adapter_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/* Flow-IPC: Sessions</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright 2023 Akamai Technologies, Inc.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * Licensed under the Apache License, Version 2.0 (the</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> * &quot;License&quot;); you may not use this file except in</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"> * compliance with the License.  You may obtain a copy</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> * of the License at</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"> *</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"> *   https://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment"> *</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment"> * Unless required by applicable law or agreed to in</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment"> * writing, software distributed under the License is</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment"> * distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment"> * CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment"> * See the License for the specific language governing</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment"> * permissions and limitations under the License. */</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment"></span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment">/// @file</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment"></span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &quot;<a class="code" href="session__fwd_8hpp.html">ipc/session/session_fwd.hpp</a>&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &quot;<a class="code" href="detail_2util__fwd_8hpp.html">ipc/util/detail/util_fwd.hpp</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#include &quot;<a class="code" href="sync__io__fwd_8hpp.html">ipc/util/sync_io/sync_io_fwd.hpp</a>&quot;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#include &lt;boost/move/make_unique.hpp&gt;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceipc_1_1session_1_1sync__io.html">ipc::session::sync_io</a></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>{</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="comment">// Types.</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="comment">/* @todo Technically by the established conventions of this project, there should be a ..._fwd.hpp with</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="comment"> * forward-declaration of `template&lt;typename Session&gt; class Session_adapter;`.  Maybe we should do that.  It&#39;s just...</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="comment"> * exactly two things use it (Client_session_adapter, Server_session_adapter), and it&#39;s just such pointless</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="comment"> * boiler-plate at the moment to make a sync_io/detail/sync_io_fwd.hpp just for that, when in reality they&#39;re</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="comment"> * templates and are going to include the present file anyway.  Just, eh.  For now anyway.  It&#39;s just in most other</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="comment"> * contexts postponing doing this just leads to needing to do it later anyway, at which point it feels more painful.</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="comment"> * Here though... ehhhh.... */</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="comment"></span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="comment">/**</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="comment"> * Internal-use workhorse containing common elements of Client_session_adapter and Server_session_adapter.</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="comment"> * As such it contains the machinery for:</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="comment"> *   - storing (deriving from) the adapted `Session` as accessible via Session_adapter::core();</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="comment"> *   - adapting async-I/O on-error and on-passive-channel-open (if enabled) events to `sync_io` pattern;</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="comment"> *   - storing and invoking the central util::sync_io::Event_wait_func supplied by the user;</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="comment"> *   - type aliases common to all sessions.</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span><span class="comment"> *</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="comment"> * @tparam Session</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="comment"> *         See, e.g., Client_session_adapter.</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span><span class="comment"> */</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html">   51</a></span><span class="keyword">class </span><a class="code hl_class" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html">Session_adapter</a></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>{</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>  <span class="comment">// Types.</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="comment"></span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><span class="comment">  /// See, e.g., Client_session_adapter.</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#abc472aaaad1fd0f07ebb0e2be5c6ac76">   57</a></span><span class="comment"></span>  <span class="keyword">using </span><a class="code hl_class" href="classipc_1_1session_1_1Session.html">Session_obj</a> = <a class="code hl_class" href="classipc_1_1session_1_1Session.html">Session</a>;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span><span class="comment"></span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="comment">  /// See, e.g., Client_session_adapter.</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a47a22b38296b06d11e16b72e5e882d19">   60</a></span><span class="comment"></span>  <span class="keyword">using </span><a class="code hl_class" href="classipc_1_1transport_1_1Null__peer.html">Sync_io_obj</a> = <a class="code hl_class" href="classipc_1_1transport_1_1Null__peer.html">transport::Null_peer</a>;<span class="comment"></span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span><span class="comment">  /// See, e.g., Client_session_adapter.</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#acd918fba6fb3c43feefdcf7719d527c9">   62</a></span><span class="comment"></span>  <span class="keyword">using </span><a class="code hl_class" href="classipc_1_1session_1_1Session.html">Async_io_obj</a> = <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#abc472aaaad1fd0f07ebb0e2be5c6ac76">Session_obj</a>;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span><span class="comment"></span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="comment">  /// Short-hand for session-openable Channel type.</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a3c0cceec02c1870cf23d6788f19ed083">   65</a></span><span class="comment"></span>  <span class="keyword">using </span><a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a3c0cceec02c1870cf23d6788f19ed083">Channel_obj</a> = <span class="keyword">typename</span> <a class="code hl_typedef" href="classipc_1_1session_1_1Session.html#a2f770785552536f3b929f293c44834d2">Session_obj::Channel_obj</a>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span><span class="comment"></span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="comment">  /// Short-hand for session-open metadata reader.</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a47d8e7dccbe05a7834e4b9687b755a2b">   68</a></span><span class="comment"></span>  <span class="keyword">using </span><a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a47d8e7dccbe05a7834e4b9687b755a2b">Mdt_reader_ptr</a> = <span class="keyword">typename</span> <a class="code hl_typedef" href="classipc_1_1session_1_1Session.html#ae197d051e06be6f132e193e9ba7ab6ae">Session_obj::Mdt_reader_ptr</a>;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="comment"></span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><span class="comment">  /// Short-hand for passive-channel-open handler.</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab0028c9cad3d0d254b3cbb20d27e0c48">   71</a></span><span class="comment"></span>  <span class="keyword">using </span><a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab0028c9cad3d0d254b3cbb20d27e0c48">On_channel_func</a> = <a class="code hl_typedef" href="namespaceipc.html#aa455c7f045059736578ca275fc1a851f">Function</a>&lt;void (<a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a3c0cceec02c1870cf23d6788f19ed083">Channel_obj</a>&amp;&amp;, <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a47d8e7dccbe05a7834e4b9687b755a2b">Mdt_reader_ptr</a>&amp;&amp;)&gt;;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>  <span class="comment">// Constructors/destructor.</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span><span class="comment"></span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span><span class="comment">   * Compilable only when #Session_obj is a `Client_session` variant, forwards to its ctor of identical form,</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span><span class="comment">   * except that the handlers are replaced with `sync_io`-adapting ones.  Do not use init_handlers() after this ctor,</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span><span class="comment">   * as that is for `Server_session`.</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span><span class="comment">   *</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span><span class="comment">   * @param logger_ptr</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span><span class="comment">   *        See Client_session_mv.</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span><span class="comment">   * @param cli_app_ref</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span><span class="comment">   *        See Client_session_mv.</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="comment">   * @param srv_app_ref</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><span class="comment">   *        See Client_session_mv.</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span><span class="comment">   * @param on_err_func</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span><span class="comment">   *        See Client_session_mv.  However in `*this` case this shall be invoked -- though still only following</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span><span class="comment">   *        successful `core()-&gt;sync_connect()` as usual -- according to `sync_io` pattern, synchronously inside</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="comment">   *        an async-wait performed by you and reported via `(*on_active_ev_func)()`.</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span><span class="comment">   * @param on_passive_open_channel_func</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span><span class="comment">   *        See Client_session_mv.  However in `*this` case this shall be invoked -- though still only following</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="comment">   *        successful `core()-&gt;sync_connect()` as usual -- according to `sync_io` pattern, synchronously inside</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span><span class="comment">   *        an async-wait performed by you and reported via `(*on_active_ev_func)()`.</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span><span class="comment">   * @tparam On_passive_open_channel_handler</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span><span class="comment">   *         See Client_session_mv.</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span><span class="comment">   * @tparam Task_err</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span><span class="comment">   *         See Client_session_mv.</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span><span class="comment">   */</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>  <span class="keyword">template</span>&lt;<span class="keyword">typename</span> On_passive_open_channel_handler, <span class="keyword">typename</span> Task_err&gt;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>  <span class="keyword">explicit</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8b4dada833c59e6a63780dfaba4f704f">Session_adapter</a>(flow::log::Logger* logger_ptr,</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>                           <span class="keyword">const</span> <a class="code hl_struct" href="structipc_1_1session_1_1Client__app.html">Client_app</a>&amp; cli_app_ref, <span class="keyword">const</span> <a class="code hl_struct" href="structipc_1_1session_1_1Server__app.html">Server_app</a>&amp; srv_app_ref,</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>                           Task_err&amp;&amp; on_err_func,</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>                           On_passive_open_channel_handler&amp;&amp; on_passive_open_channel_func);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span><span class="comment"></span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span><span class="comment">   * Compilable only when #Session_obj is a `Client_session` variant, forwards to its ctor of identical form,</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span><span class="comment">   * except that the handler is replaced with `sync_io`-adapting one.  Do not use init_handlers() after this ctor,</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span><span class="comment">   * as that is for `Server_session`.</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span><span class="comment">   *</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span><span class="comment">   * @param logger_ptr</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span><span class="comment">   *        Logger to use for logging subsequently.</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span><span class="comment">   * @param cli_app_ref</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span><span class="comment">   *        See Client_session_mv.</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span><span class="comment">   * @param srv_app_ref</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span><span class="comment">   *        See Client_session_mv.</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span><span class="comment">   * @param on_err_func</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span><span class="comment">   *        See Client_session_mv.  However in `*this` case this shall be invoked -- though still only following</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span><span class="comment">   *        successful `*_connect()` as usual -- according to `sync_io` pattern, synchronously inside</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span><span class="comment">   *        an async-wait performed by you and reported via `(*on_active_ev_func)()`.</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span><span class="comment">   * @tparam Task_err</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span><span class="comment">   *         See Client_session_mv.</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span><span class="comment">   */</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>  <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Task_err&gt;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>  <span class="keyword">explicit</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8b4dada833c59e6a63780dfaba4f704f">Session_adapter</a>(flow::log::Logger* logger_ptr,</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>                           <span class="keyword">const</span> <a class="code hl_struct" href="structipc_1_1session_1_1Client__app.html">Client_app</a>&amp; cli_app_ref, <span class="keyword">const</span> <a class="code hl_struct" href="structipc_1_1session_1_1Server__app.html">Server_app</a>&amp; srv_app_ref,</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>                           Task_err&amp;&amp; on_err_func);</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span><span class="comment"></span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span><span class="comment">  /// Forwards to the #Session_obj default ctor.</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span><span class="comment"></span>  <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8b4dada833c59e6a63780dfaba4f704f">Session_adapter</a>();</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span><span class="comment"></span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span><span class="comment">   * See, e.g., Client_session_adapter.</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span><span class="comment">   *</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span><span class="comment">   * @tparam Event_wait_func_t</span></div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span><span class="comment">   *         See above.</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span><span class="comment">   * @param ev_wait_func</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span><span class="comment">   *        See above.</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span><span class="comment">   * @return See above.</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span><span class="comment">   */</span></div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>  <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Event_wait_func_t&gt;</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>  <span class="keywordtype">bool</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ac9ff4515c84ff66ae8eafbf102c83df0">start_ops</a>(Event_wait_func_t&amp;&amp; ev_wait_func);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span><span class="comment"></span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span><span class="comment">   * See, e.g., Client_session_adapter.</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span><span class="comment">   *</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span><span class="comment">   * @tparam Create_ev_wait_hndl_func</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span><span class="comment">   *         See above.</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span><span class="comment">   * @param create_ev_wait_hndl_func</span></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span><span class="comment">   *        See above.</span></div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span><span class="comment">   * @return See above.</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span><span class="comment">   */</span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span>  <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Create_ev_wait_hndl_func&gt;</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span>  <span class="keywordtype">bool</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6936f814627243f273d700750def19e2">replace_event_wait_handles</a>(<span class="keyword">const</span> Create_ev_wait_hndl_func&amp; create_ev_wait_hndl_func);</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span><span class="comment"></span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span><span class="comment">   * Compilable only when #Session_obj is a `Server_session` variant, forwards to its method of identical form,</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span><span class="comment">   * except that the handlers are replaced with `sync_io`-adapting ones.  Do not use non-default ctor before this,</span></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span><span class="comment">   * as that is for `Client_session`.</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span><span class="comment">   *</span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span><span class="comment">   * @tparam Task_err</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span><span class="comment">   *         See Session_server.</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span><span class="comment">   * @tparam On_passive_open_channel_handler</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span><span class="comment">   *         See Session_server.</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span><span class="comment">   * @param on_err_func_arg</span></div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span><span class="comment">   *        See Session_server.</span></div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span><span class="comment">   * @param on_passive_open_channel_func_arg</span></div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span><span class="comment">   *        See Session_server.</span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span><span class="comment">   * @return See Session_server; in addition returns `false`/no-ops if invoked before start_ops().</span></div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span><span class="comment">   */</span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span>  <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Task_err, <span class="keyword">typename</span> On_passive_open_channel_handler&gt;</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span>  <span class="keywordtype">bool</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae7fcf6915de1764b69d0d49abb20666e">init_handlers</a>(Task_err&amp;&amp; on_err_func_arg, On_passive_open_channel_handler&amp;&amp; on_passive_open_channel_func_arg);</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span><span class="comment"></span> </div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span><span class="comment">   * Compilable only when #Session_obj is a `Server_session` variant, forwards to its method of identical form,</span></div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span><span class="comment">   * except that the handlers are replaced with `sync_io`-adapting ones.  Do not use non-default ctor before this,</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span><span class="comment">   * as that is for `Client_session`.</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span><span class="comment">   *</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span><span class="comment">   * @tparam Task_err</span></div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span><span class="comment">   *         See Session_server.</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span><span class="comment">   * @param on_err_func_arg</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span><span class="comment">   *        See Session_server.</span></div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span><span class="comment">   * @return See Session_server; in addition returns `false`/no-ops if invoked before start_ops().</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span><span class="comment">   */</span></div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span>  <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Task_err&gt;</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>  <span class="keywordtype">bool</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae7fcf6915de1764b69d0d49abb20666e">init_handlers</a>(Task_err&amp;&amp; on_err_func_arg);</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span><span class="comment"></span> </div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span><span class="comment">   * See `flow::log::Log_context`.</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span><span class="comment">   * @return See above.</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span><span class="comment">   */</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Client__session__adapter.html#ab779934fe031f22ed0223610cc4c9cf0">  191</a></span>  flow::log::Logger* <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab779934fe031f22ed0223610cc4c9cf0">get_logger</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span><span class="comment"></span> </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span><span class="comment">   * See `flow::log::Log_context`.</span></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span><span class="comment">   * @return See above.</span></div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span><span class="comment">   */</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Client__session__adapter.html#a119e8c2b3a76498aa239c43e050fd349">  197</a></span>  <span class="keyword">const</span> flow::log::Component&amp; <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a119e8c2b3a76498aa239c43e050fd349">get_log_component</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span> </div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>  <span class="comment">// Methods.</span></div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span><span class="comment"></span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span><span class="comment">   * Forwards to the util::sync_io::Event_wait_func saved in start_ops().</span></div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span><span class="comment">   *</span></div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span><span class="comment">   * @tparam Args</span></div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span><span class="comment">   *         See above.</span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span><span class="comment">   * @param args</span></div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span><span class="comment">   *        See above.</span></div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span><span class="comment">   */</span></div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span>  <span class="keyword">template</span>&lt;<span class="keyword">typename</span>... Args&gt;</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6a7dada7f109cd5bd999d3c08e20b179">async_wait</a>(Args&amp;&amp;... args);</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span><span class="comment"></span> </div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span><span class="comment">   * Utility that sets up an IPC-pipe in the given peer objects as well as loading a watcher-descriptor</span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span><span class="comment">   * object for the read-end.  This should be called before start_ops() or replace_event_wait_handles().</span></div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span><span class="comment">   *</span></div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span><span class="comment">   * @param reader</span></div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span><span class="comment">   *        Pipe read end to load.  It should be constructed with its intended execution context/executor but</span></div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span><span class="comment">   *        not `.is_open()`.</span></div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span><span class="comment">   * @param writer</span></div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span><span class="comment">   *        Pipe write end to load.  It should be constructed with its intended execution context/executor but</span></div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span><span class="comment">   *        not `.is_open()`.</span></div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span><span class="comment">   * @param ev_wait_hndl</span></div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span><span class="comment">   *        Watcher for `reader`.  It should be constructed with its intended execution context/executor but</span></div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span><span class="comment">   *        not `.is_open()`.</span></div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span><span class="comment">   */</span></div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">init_pipe</a>(<a class="code hl_typedef" href="namespaceipc_1_1util.html#aaf368acf8243bb25de3eef4e836c15de">util::Pipe_reader</a>* reader, <a class="code hl_typedef" href="namespaceipc_1_1util.html#a844d5ca9c17b672644fc8d9dbe758db0">util::Pipe_writer</a>* writer,</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>                 <a class="code hl_class" href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html">util::sync_io::Asio_waitable_native_handle</a>* ev_wait_hndl);</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span><span class="comment"></span> </div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span><span class="comment">   * The adapted mutable #Session_obj.</span></div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span><span class="comment">   * @return See above.</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span><span class="comment">   */</span></div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span>  <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Client__session__adapter.html#a5ea8209bc1286af653783eb043ec0629">Session_obj</a>* <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a93fc44829d49b7633d1dddfab7998f78">core</a>();</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno">  235</span><span class="comment"></span> </div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span><span class="comment">   * The adapted mutable #Session_obj.</span></div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span><span class="comment">   * @return See above.</span></div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span><span class="comment">   */</span></div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span>  <span class="keyword">const</span> <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Client__session__adapter.html#a5ea8209bc1286af653783eb043ec0629">Session_obj</a>* <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a93fc44829d49b7633d1dddfab7998f78">core</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span> </div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>  <span class="comment">// Types.</span></div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span><span class="comment"></span> </div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span><span class="comment">  /// Set of result arg values from a successful passive-channel-open from a #Session_obj invoking #On_channel_func.</span></div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"><a class="line" href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html">  246</a></span><span class="comment"></span>  <span class="keyword">struct </span><a class="code hl_struct" href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html">Channel_open_result</a></div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span>  {</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span>    <span class="comment">// Types.</span></div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span><span class="comment"></span> </div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span><span class="comment">    /// Short-hand for pointer wrapper around a `*this`.</span></div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"><a class="line" href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a66d9fad46eb4c59bee360b92d1763b92">  251</a></span><span class="comment"></span>    <span class="keyword">using </span><a class="code hl_typedef" href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a66d9fad46eb4c59bee360b92d1763b92">Ptr</a> = boost::movelib::unique_ptr&lt;Channel_open_result&gt;;</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span> </div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span>    <span class="comment">// Data.</span></div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span><span class="comment"></span> </div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span><span class="comment">    /// Result 1/2 given about to be given to #m_on_channel_func_or_empty.</span></div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"><a class="line" href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a2cd3ea9543f4300d3c6fe47ada8798ee">  256</a></span><span class="comment"></span>    <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a3c0cceec02c1870cf23d6788f19ed083">Channel_obj</a> <a class="code hl_variable" href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a2cd3ea9543f4300d3c6fe47ada8798ee">m_channel</a>;</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span><span class="comment"></span> </div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span><span class="comment">    /// Result 2/2 given about to be given to #m_on_channel_func_or_empty.</span></div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"><a class="line" href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a5868da8b3a718d43af3d3b7a5c611cd8">  259</a></span><span class="comment"></span>    <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a47d8e7dccbe05a7834e4b9687b755a2b">Mdt_reader_ptr</a> <a class="code hl_variable" href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a5868da8b3a718d43af3d3b7a5c611cd8">m_mdt_reader_ptr</a>;</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span>  };</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span><span class="comment"></span> </div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno">  262</span><span class="comment">  /// Queue of Channel_open_result.</span></div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae6a66562d53b886d72e3edc875911b11">  263</a></span><span class="comment"></span>  <span class="keyword">using </span><a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae6a66562d53b886d72e3edc875911b11">Channel_open_result_q</a> = std::queue&lt;typename Channel_open_result::Ptr&gt;;</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span> </div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span>  <span class="comment">// Methods.</span></div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno">  266</span><span class="comment"></span> </div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span><span class="comment">   * Signaled by the function returned by on_channel_func_sio(), it returns the IPC-pipe to steady-state (empty,</span></div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span><span class="comment">   * not readable), invokes the original user handler passed to on_channel_func_sio(), and lastly</span></div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno">  270</span><span class="comment">   * begins the next async-wait for the procedure.</span></div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span><span class="comment">   */</span></div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a49853cc0cc44d2bb3ee20823d2b02ff5">on_ev_channel_open</a>();</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span><span class="comment"></span> </div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno">  274</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno">  275</span><span class="comment">   * Returns the proper on-error handler to set up on the underlying #Session_obj (`Client_session`:</span></div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span><span class="comment">   * via ctor; `Server_session`: via `init_handlers()`).</span></div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span><span class="comment">   *</span></div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno">  278</span><span class="comment">   * The resulting handler must not be invoked before start_ops() and #m_on_err_func being set;</span></div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno">  279</span><span class="comment">   * else behavior undefined.</span></div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno">  280</span><span class="comment">   *</span></div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno">  281</span><span class="comment">   * @return See above.</span></div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span><span class="comment">   */</span></div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno">  283</span>  flow::async::Task_asio_err <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a5bbcf8b33bc02ccb371449692d09e642">on_err_func_sio</a>();</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span><span class="comment"></span> </div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span><span class="comment">   * Returns the proper on-passive-channel-open handler to set up on the underlying #Session_obj (`Client_session`:</span></div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno">  287</span><span class="comment">   * via ctor; `Server_session`: via `init_handlers()` 2-arg form).</span></div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span><span class="comment">   *</span></div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno">  289</span><span class="comment">   * The resulting handler must not be invoked before start_ops() and #m_on_channel_func_or_empty being set;</span></div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno">  290</span><span class="comment">   * else behavior undefined.</span></div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno">  291</span><span class="comment">   *</span></div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno">  292</span><span class="comment">   * @return See above.</span></div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span><span class="comment">   */</span></div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno">  294</span>  <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab0028c9cad3d0d254b3cbb20d27e0c48">On_channel_func</a> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a527ef097783127e73184258166a891a3">on_channel_func_sio</a>();</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno">  295</span> </div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno">  296</span>  <span class="comment">// Data.</span></div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno">  297</span><span class="comment"></span> </div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno">  298</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno">  299</span><span class="comment">   * The `Task_engine` for `m_ready_*`.  It is necessary to construct those pipe-end objects, but we never</span></div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno">  300</span><span class="comment">   * use that guy&#39;s `-&gt;async_*()` APIs -- only non-blocking operations, essentially leveraging boost.asio&#39;s</span></div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno">  301</span><span class="comment">   * portable transmission APIs but not its actual, um, async-I/O abilities in this case.  Accordingly we</span></div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno">  302</span><span class="comment">   * never load any tasks onto #m_nb_task_engine and certainly never `.run()` (or `.poll()` or ...) it.</span></div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno">  303</span><span class="comment">   *</span></div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno">  304</span><span class="comment">   * In the `sync_io` pattern the user&#39;s outside event loop is responsible for awaiting readability/writability</span></div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno">  305</span><span class="comment">   * of a guy like #m_ready_reader_chan via our exporting of its `.native_handle()`.</span></div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno">  306</span><span class="comment">   */</span></div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af0b0e94d115b13c6a5b5bfde46702320">  307</a></span>  flow::util::Task_engine <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af0b0e94d115b13c6a5b5bfde46702320">m_nb_task_engine</a>;</div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno">  308</span><span class="comment"></span> </div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno">  310</span><span class="comment">   * The `Task_engine` for `m_ev_wait_hndl_*`, unless it is replaced via replace_event_wait_handles().</span></div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span><span class="comment">   *</span></div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span><span class="comment">   * This is to fulfill the `sync_io` pattern.</span></div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno">  313</span><span class="comment">   */</span></div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af305212e9de780ac16f4bfed4a666f7f">  314</a></span>  flow::util::Task_engine <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af305212e9de780ac16f4bfed4a666f7f">m_ev_hndl_task_engine_unused</a>;</div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno">  315</span><span class="comment"></span> </div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno">  316</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span><span class="comment">   * Read-end of IPC-pipe used by `*this` used to detect that the error-wait has completed.  The signal byte</span></div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno">  318</span><span class="comment">   * is detected in #m_ready_reader_err.  There is no need to read it, as an error can occur at most once.</span></div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno">  319</span><span class="comment">   *</span></div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno">  320</span><span class="comment">   * @see #m_ready_writer_err.</span></div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno">  321</span><span class="comment">   */</span></div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6ea8f9f021af50050dbb88bd14978e24">  322</a></span>  <a class="code hl_typedef" href="namespaceipc_1_1util.html#aaf368acf8243bb25de3eef4e836c15de">util::Pipe_reader</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6ea8f9f021af50050dbb88bd14978e24">m_ready_reader_err</a>;</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno">  323</span><span class="comment"></span> </div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno">  324</span><span class="comment">  /// Write-end of IPC-pipe together with #m_ready_reader_err.</span></div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a22c47810c9273ce7f86b85f51c474b9f">  325</a></span><span class="comment"></span>  <a class="code hl_typedef" href="namespaceipc_1_1util.html#a844d5ca9c17b672644fc8d9dbe758db0">util::Pipe_writer</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a22c47810c9273ce7f86b85f51c474b9f">m_ready_writer_err</a>;</div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno">  326</span><span class="comment"></span> </div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno">  327</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno">  328</span><span class="comment">   * Descriptor waitable by outside event loop async-waits -- storing the same `Native_handle` as (and thus being</span></div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno">  329</span><span class="comment">   * used to wait on events from) #m_ready_reader_err.</span></div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno">  330</span><span class="comment">   */</span></div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a23a9d957374f24739147bbda694e7b8b">  331</a></span>  <a class="code hl_class" href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html">util::sync_io::Asio_waitable_native_handle</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a23a9d957374f24739147bbda694e7b8b">m_ev_wait_hndl_err</a>;</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno">  332</span><span class="comment"></span> </div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno">  333</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno">  334</span><span class="comment">   * Read-end of IPC-pipe used by `*this` used to detect that a channel-open-wait has completed.  The signal byte</span></div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno">  335</span><span class="comment">   * is read out of #m_ready_reader_chan, after it was written there via #m_ready_writer_chan.  As explained in</span></div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno">  336</span><span class="comment">   * #m_target_channel_open_q doc header, channel-opens can occur at any time from another thread, even while</span></div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno">  337</span><span class="comment">   * `*this` is synchronously dealing with an existing one; therefore this is a rare case where more than 1 byte</span></div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno">  338</span><span class="comment">   * could be readable at a given time.  Nevertheless we issue one async-wait on #m_ready_reader_chan per</span></div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno">  339</span><span class="comment">   * channel-open, in series; eventually all of them get popped, meaning all the channel-opens have been served.</span></div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno">  340</span><span class="comment">   *</span></div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno">  341</span><span class="comment">   * This is not a rare occurrence necessarily: an opposing `Session` user can perform 2+ `open_channel()` right in</span></div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno">  342</span><span class="comment">   * a row, and since creating a `Channel` with all its 2-4 fat peer objects can be relatively lengthy on this</span></div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno">  343</span><span class="comment">   * side, the 2nd/3rd/... on-channel-open firing can &quot;step on&quot; a preceding one.</span></div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno">  344</span><span class="comment">   *</span></div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno">  345</span><span class="comment">   * @see #m_ready_writer_chan.</span></div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno">  346</span><span class="comment">   */</span></div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a95ca5ad4d856f3921b9e0b3accf7b618">  347</a></span>  <a class="code hl_typedef" href="namespaceipc_1_1util.html#aaf368acf8243bb25de3eef4e836c15de">util::Pipe_reader</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a95ca5ad4d856f3921b9e0b3accf7b618">m_ready_reader_chan</a>;</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno">  348</span><span class="comment"></span> </div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno">  349</span><span class="comment">  /// Write-end of IPC-pipe together with #m_ready_reader_chan.</span></div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#aef11d364d6df923acff043cd7b3bee1d">  350</a></span><span class="comment"></span>  <a class="code hl_typedef" href="namespaceipc_1_1util.html#a844d5ca9c17b672644fc8d9dbe758db0">util::Pipe_writer</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#aef11d364d6df923acff043cd7b3bee1d">m_ready_writer_chan</a>;</div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno">  351</span><span class="comment"></span> </div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno">  352</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno">  353</span><span class="comment">   * Descriptor waitable by outside event loop async-waits -- storing the same `Native_handle` as (and thus being</span></div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno">  354</span><span class="comment">   * used to wait on events from) #m_ready_reader_chan.</span></div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno">  355</span><span class="comment">   */</span></div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8e4d1659efd084274bcea1bbcee88533">  356</a></span>  <a class="code hl_class" href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html">util::sync_io::Asio_waitable_native_handle</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8e4d1659efd084274bcea1bbcee88533">m_ev_wait_hndl_chan</a>;</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno">  357</span><span class="comment"></span> </div>
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno">  358</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno">  359</span><span class="comment">   * Function (set forever in start_ops()) through which we invoke the outside event loop&#39;s</span></div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno">  360</span><span class="comment">   * async-wait facility for descriptors/events relevant to our ops.  See util::sync_io::Event_wait_func</span></div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno">  361</span><span class="comment">   * doc header for a refresher on this mechanic.</span></div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno">  362</span><span class="comment">   */</span></div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ad234c5fbbbd01b0c8b3f3edfa02f1cb0">  363</a></span>  <a class="code hl_typedef" href="namespaceipc_1_1util_1_1sync__io.html#aa0b9a3cc6bdc7dedbef4f9e06851aa24">util::sync_io::Event_wait_func</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ad234c5fbbbd01b0c8b3f3edfa02f1cb0">m_ev_wait_func</a>;</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno">  364</span><span class="comment"></span> </div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno">  365</span><span class="comment">  /// `on_err_func` from init_handlers(); `.empty()` until then.</span></div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a00009e3a7b3a9643af82469ec9647679">  366</a></span><span class="comment"></span>  flow::async::Task_asio_err <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a00009e3a7b3a9643af82469ec9647679">m_on_err_func</a>;</div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno">  367</span><span class="comment"></span> </div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno">  368</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno">  369</span><span class="comment">   * `on_passive_open_channel_func_or_empty` from init_handlers() (possibly `.empty()` if not supplied); until then</span></div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno">  370</span><span class="comment">   * `.empty()`.</span></div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno">  371</span><span class="comment">   */</span></div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af2a771da81e49f5e38774e087c448c75">  372</a></span>  <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab0028c9cad3d0d254b3cbb20d27e0c48">On_channel_func</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af2a771da81e49f5e38774e087c448c75">m_on_channel_func_or_empty</a>;</div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno">  373</span><span class="comment"></span> </div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno">  374</span><span class="comment">  /// Result given to (or about to be given to) #m_on_err_func.</span></div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a698532c47d2962e7e60dc804ac5c4e53">  375</a></span><span class="comment"></span>  <a class="code hl_typedef" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89">Error_code</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a698532c47d2962e7e60dc804ac5c4e53">m_target_err_code_err</a>;</div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno">  376</span><span class="comment"></span> </div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno">  377</span><span class="comment">  /**</span></div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno">  378</span><span class="comment">   * Queue of #On_channel_func handler arg sets received from async-I/O #Session_obj -- meaning</span></div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno">  379</span><span class="comment">   * the `Session`, in unspecified background thread, informing us (which we signal via #m_ready_writer_chan)</span></div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno">  380</span><span class="comment">   * a channel has been passively open -- and not yet fed to #m_on_channel_func_or_empty.</span></div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno">  381</span><span class="comment">   *</span></div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno">  382</span><span class="comment">   * Protected by #m_target_channel_open_q_mutex.</span></div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno">  383</span><span class="comment">   *</span></div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno">  384</span><span class="comment">   * ### Rationale ###</span></div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno">  385</span><span class="comment">   * There&#39;s a queue here, which stands in contrast to (as of this writing) all other `sync_io` pattern impls</span></div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno">  386</span><span class="comment">   * in the project, including the on-error stuff in `*this`: those always deal with a single async-op at a time,</span></div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno">  387</span><span class="comment">   * and therefore no queue is necessary (just a single arg-set; usually just an `Error_code`, sometimes</span></div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno">  388</span><span class="comment">   * with a `size_t sz` though).</span></div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno">  389</span><span class="comment">   *</span></div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno">  390</span><span class="comment">   * The reason this one is different is as follows.</span></div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno">  391</span><span class="comment">   *   - It&#39;s unlike, e.g., a `&quot;Client_session_adapter::async_connect()&quot;`, because an async-connect is triggered by the</span></div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno">  392</span><span class="comment">   *     user explicitly, which triggers a single async-wait, and we disallow in our API to trigger more, until</span></div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno">  393</span><span class="comment">   *     that one completes.  (Confusing note: There is no such async-connect method as of this writing, because there&#39;s</span></div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno">  394</span><span class="comment">   *     no `async_connect()` on Client_session_mv, which the latter&#39;s doc header justifies... while also noting it</span></div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno">  395</span><span class="comment">   *     *would* exist, if that guy were network-enabled; we&#39;ll probably add this at some point.  So pretend it did to</span></div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno">  396</span><span class="comment">   *     grok this bullet point.  Or just ignore it for now.)</span></div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno">  397</span><span class="comment">   *   - It&#39;s unlike, e.g., #m_on_err_func stuff in `*this`, because while that one can indeed happen at any time</span></div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno">  398</span><span class="comment">   *     from another thread -- without the user explicitly beginning the async-op (it sort of begins by itself) --</span></div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno">  399</span><span class="comment">   *     it can also only happen at most once per `*this` (modulo move-assignment).</span></div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno">  400</span><span class="comment">   *</span></div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno">  401</span><span class="comment">   * At any rate: the handler we register with #m_async_io -- on_channel_func_sio() -- can be invoked</span></div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno">  402</span><span class="comment">   * from a background thread at any time.  This triggers signaling #m_ready_reader_chan (via #m_ready_writer_chan),</span></div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno">  403</span><span class="comment">   * on which there is always a `sync_io`-pattern async-wait outstanding.  We are informed of a completed</span></div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno">  404</span><span class="comment">   * async-wait (byte is available on #m_ready_reader_chan); we consume the byte and pop and pass the result</span></div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno">  405</span><span class="comment">   * from top of #m_target_channel_open_q.  Then we start another async-wait.  If there are more items in the queue</span></div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno">  406</span><span class="comment">   * that were added in the meantime, the same number of bytes have been pushed into #m_ready_writer_chan;</span></div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno">  407</span><span class="comment">   * so those async-waits are satisfied (in series) quickly, leading to the progressive emptying of this queue</span></div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno">  408</span><span class="comment">   * and passing along those results to `m_on_channel_func_or_empty()`.</span></div>
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno">  409</span><span class="comment">   */</span></div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ad26ef2d688edc711821951d00101ccae">  410</a></span>  <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae6a66562d53b886d72e3edc875911b11">Channel_open_result_q</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ad26ef2d688edc711821951d00101ccae">m_target_channel_open_q</a>;</div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno">  411</span><span class="comment"></span> </div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno">  412</span><span class="comment">  /// Protects #m_target_channel_open_q, accessed from user async-wait-reporter thread; and #Session_obj worker thread.</span></div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a7212b0336f96d32d6ab36ef43e16135a">  413</a></span><span class="comment"></span>  <span class="keyword">mutable</span> flow::util::Mutex_non_recursive <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a7212b0336f96d32d6ab36ef43e16135a">m_target_channel_open_q_mutex</a>;</div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno">  414</span><span class="comment"></span> </div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno">  415</span><span class="comment">  /// This guy does all the work.  In our dtor this will be destroyed (hence thread stopped) first-thing.</span></div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#acff016523b1b1cff00f6d44a47cc9426">  416</a></span><span class="comment"></span>  <a class="code hl_class" href="classipc_1_1session_1_1Session.html">Async_io_obj</a> <a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#acff016523b1b1cff00f6d44a47cc9426">m_async_io</a>;</div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno">  417</span>}; <span class="comment">// class Session_adapter</span></div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno">  418</span> </div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno">  419</span><span class="comment">// Template implementations.</span></div>
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno">  420</span> </div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno">  421</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8b4dada833c59e6a63780dfaba4f704f">  422</a></span><a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8b4dada833c59e6a63780dfaba4f704f">Session_adapter&lt;Session&gt;::Session_adapter</a>() :</div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno">  423</span>  m_ready_reader_err(m_nb_task_engine), <span class="comment">// No handle inside but will be set-up soon below.</span></div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno">  424</span>  m_ready_writer_err(m_nb_task_engine), <span class="comment">// Ditto.</span></div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno">  425</span>  m_ev_wait_hndl_err(m_ev_hndl_task_engine_unused), <span class="comment">// This needs to be .assign()ed still.</span></div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno">  426</span>  m_ready_reader_chan(m_nb_task_engine),</div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno">  427</span>  m_ready_writer_chan(m_nb_task_engine),</div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno">  428</span>  m_ev_wait_hndl_chan(m_ev_hndl_task_engine_unused)</div>
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno">  429</span>{</div>
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno">  430</span>  <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">init_pipe</a>(&amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6ea8f9f021af50050dbb88bd14978e24">m_ready_reader_err</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a22c47810c9273ce7f86b85f51c474b9f">m_ready_writer_err</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a23a9d957374f24739147bbda694e7b8b">m_ev_wait_hndl_err</a>);</div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno">  431</span>  <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">init_pipe</a>(&amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a95ca5ad4d856f3921b9e0b3accf7b618">m_ready_reader_chan</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#aef11d364d6df923acff043cd7b3bee1d">m_ready_writer_chan</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8e4d1659efd084274bcea1bbcee88533">m_ev_wait_hndl_chan</a>);</div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno">  432</span>}</div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno">  433</span> </div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno">  434</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno">  435</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> On_passive_open_channel_handler, <span class="keyword">typename</span> Task_err&gt;</div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab32530e74cd4d2b2fc116baa93c02a18">  436</a></span><a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8b4dada833c59e6a63780dfaba4f704f">Session_adapter&lt;Session&gt;::Session_adapter</a>(flow::log::Logger* logger_ptr,</div>
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno">  437</span>                                          <span class="keyword">const</span> <a class="code hl_struct" href="structipc_1_1session_1_1Client__app.html">Client_app</a>&amp; cli_app_ref, <span class="keyword">const</span> <a class="code hl_struct" href="structipc_1_1session_1_1Server__app.html">Server_app</a>&amp; srv_app_ref,</div>
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno">  438</span>                                          Task_err&amp;&amp; on_err_func,</div>
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno">  439</span>                                          On_passive_open_channel_handler&amp;&amp; on_passive_open_channel_func) :</div>
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno">  440</span>  m_ready_reader_err(m_nb_task_engine), <span class="comment">// No handle inside but will be set-up soon below.</span></div>
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno">  441</span>  m_ready_writer_err(m_nb_task_engine), <span class="comment">// Ditto.</span></div>
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno">  442</span>  m_ev_wait_hndl_err(m_ev_hndl_task_engine_unused), <span class="comment">// This needs to be .assign()ed still.</span></div>
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno">  443</span>  m_ready_reader_chan(m_nb_task_engine),</div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno">  444</span>  m_ready_writer_chan(m_nb_task_engine),</div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno">  445</span>  m_ev_wait_hndl_chan(m_ev_hndl_task_engine_unused),</div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno">  446</span>  m_on_err_func(std::move(on_err_func)),</div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno">  447</span>  m_on_channel_func_or_empty(std::move(on_passive_open_channel_func)),</div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno">  448</span>  m_async_io(logger_ptr, cli_app_ref, srv_app_ref, on_err_func_sio(), on_channel_func_sio())</div>
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno">  449</span>{</div>
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno">  450</span>  <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">init_pipe</a>(&amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6ea8f9f021af50050dbb88bd14978e24">m_ready_reader_err</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a22c47810c9273ce7f86b85f51c474b9f">m_ready_writer_err</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a23a9d957374f24739147bbda694e7b8b">m_ev_wait_hndl_err</a>);</div>
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno">  451</span>  <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">init_pipe</a>(&amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a95ca5ad4d856f3921b9e0b3accf7b618">m_ready_reader_chan</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#aef11d364d6df923acff043cd7b3bee1d">m_ready_writer_chan</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8e4d1659efd084274bcea1bbcee88533">m_ev_wait_hndl_chan</a>);</div>
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno">  452</span>}</div>
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno">  453</span> </div>
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno">  454</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno">  455</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Task_err&gt;</div>
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a93686af4c1d28eb767d1cc3ffce1794b">  456</a></span><a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8b4dada833c59e6a63780dfaba4f704f">Session_adapter&lt;Session&gt;::Session_adapter</a>(flow::log::Logger* logger_ptr,</div>
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno">  457</span>                                          <span class="keyword">const</span> <a class="code hl_struct" href="structipc_1_1session_1_1Client__app.html">Client_app</a>&amp; cli_app_ref, <span class="keyword">const</span> <a class="code hl_struct" href="structipc_1_1session_1_1Server__app.html">Server_app</a>&amp; srv_app_ref,</div>
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno">  458</span>                                          Task_err&amp;&amp; on_err_func) :</div>
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno">  459</span>  m_ready_reader_err(m_nb_task_engine), <span class="comment">// No handle inside but will be set-up soon below.</span></div>
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno">  460</span>  m_ready_writer_err(m_nb_task_engine), <span class="comment">// Ditto.</span></div>
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno">  461</span>  m_ev_wait_hndl_err(m_ev_hndl_task_engine_unused), <span class="comment">// This needs to be .assign()ed still.</span></div>
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno">  462</span>  m_ready_reader_chan(m_nb_task_engine),</div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno">  463</span>  m_ready_writer_chan(m_nb_task_engine),</div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno">  464</span>  m_ev_wait_hndl_chan(m_ev_hndl_task_engine_unused),</div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno">  465</span>  m_on_err_func(std::move(on_err_func)),</div>
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno">  466</span>  m_async_io(logger_ptr, cli_app_ref, srv_app_ref, on_err_func_sio())</div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno">  467</span>{</div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno">  468</span>  <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">init_pipe</a>(&amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6ea8f9f021af50050dbb88bd14978e24">m_ready_reader_err</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a22c47810c9273ce7f86b85f51c474b9f">m_ready_writer_err</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a23a9d957374f24739147bbda694e7b8b">m_ev_wait_hndl_err</a>);</div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno">  469</span>  <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">init_pipe</a>(&amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a95ca5ad4d856f3921b9e0b3accf7b618">m_ready_reader_chan</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#aef11d364d6df923acff043cd7b3bee1d">m_ready_writer_chan</a>, &amp;<a class="code hl_variable" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8e4d1659efd084274bcea1bbcee88533">m_ev_wait_hndl_chan</a>);</div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno">  470</span>}</div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno">  471</span> </div>
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno">  472</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno">  473</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Task_err, <span class="keyword">typename</span> On_passive_open_channel_handler&gt;</div>
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae7fcf6915de1764b69d0d49abb20666e">  474</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae7fcf6915de1764b69d0d49abb20666e">Session_adapter&lt;Session&gt;::init_handlers</a>(Task_err&amp;&amp; on_err_func_arg,</div>
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno">  475</span>                                             On_passive_open_channel_handler&amp;&amp; on_passive_open_channel_func_arg)</div>
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno">  476</span>{</div>
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno">  477</span>  <span class="keywordflow">if</span> (!m_on_err_func.empty())</div>
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno">  478</span>  {</div>
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno">  479</span>    FLOW_LOG_WARNING(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: init_handlers() called duplicately.  Ignoring.&quot;</span>);</div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno">  480</span>    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno">  481</span>  }</div>
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno">  482</span>  <span class="comment">// else</span></div>
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno">  483</span>  assert(m_on_channel_func_or_empty.empty());</div>
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno">  484</span> </div>
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno">  485</span>  m_on_err_func = std::move(on_err_func_arg);</div>
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno">  486</span>  m_on_channel_func_or_empty = std::move(on_passive_open_channel_func_arg);</div>
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno">  487</span> </div>
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno">  488</span><span class="preprocessor">#ifndef NDEBUG</span></div>
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno">  489</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> ok =</div>
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno">  490</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno">  491</span>  core()-&gt;init_handlers(on_err_func_sio(), on_channel_func_sio());</div>
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno">  492</span> </div>
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno">  493</span>  assert(ok &amp;&amp; <span class="stringliteral">&quot;We should have caught this with the above guard.&quot;</span>);</div>
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno">  494</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno">  495</span>} <span class="comment">// Session_adapter::init_handlers()</span></div>
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno">  496</span> </div>
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno">  497</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno">  498</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Task_err&gt;</div>
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af738e1f4be56643da0987fc1c0660e67">  499</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae7fcf6915de1764b69d0d49abb20666e">Session_adapter&lt;Session&gt;::init_handlers</a>(Task_err&amp;&amp; on_err_func_arg)</div>
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno">  500</span>{</div>
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno">  501</span>  <span class="keywordflow">if</span> (!m_on_err_func.empty())</div>
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno">  502</span>  {</div>
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno">  503</span>    FLOW_LOG_WARNING(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: init_handlers() called duplicately.  Ignoring.&quot;</span>);</div>
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno">  504</span>    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno">  505</span>  }</div>
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno">  506</span>  <span class="comment">// else</span></div>
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno">  507</span> </div>
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno">  508</span>  m_on_err_func = std::move(on_err_func_arg);</div>
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno">  509</span> </div>
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno">  510</span><span class="preprocessor">#ifndef NDEBUG</span></div>
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno">  511</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> ok =</div>
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno">  512</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno">  513</span>  core()-&gt;init_handlers(on_err_func_sio());</div>
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno">  514</span> </div>
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno">  515</span>  assert(ok &amp;&amp; <span class="stringliteral">&quot;We should have caught this with the above guard.&quot;</span>);</div>
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno">  516</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno">  517</span>} <span class="comment">// Session_adapter::init_handlers()</span></div>
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno">  518</span> </div>
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno">  519</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">  520</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">Session_adapter&lt;Session&gt;::init_pipe</a>(<a class="code hl_typedef" href="namespaceipc_1_1util.html#aaf368acf8243bb25de3eef4e836c15de">util::Pipe_reader</a>* reader, <a class="code hl_typedef" href="namespaceipc_1_1util.html#a844d5ca9c17b672644fc8d9dbe758db0">util::Pipe_writer</a>* writer,</div>
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno">  521</span>                                         <a class="code hl_class" href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html">util::sync_io::Asio_waitable_native_handle</a>* ev_wait_hndl)</div>
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno">  522</span>{</div>
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno">  523</span>  <span class="keyword">using </span><a class="code hl_struct" href="structipc_1_1util_1_1Native__handle.html">util::Native_handle</a>;</div>
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno">  524</span>  <span class="keyword">using </span>boost::asio::connect_pipe;</div>
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno">  525</span> </div>
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno">  526</span>  <a class="code hl_typedef" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89">Error_code</a> sys_err_code;</div>
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno">  527</span> </div>
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno">  528</span>  connect_pipe(*reader, *writer, sys_err_code);</div>
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno">  529</span>  <span class="keywordflow">if</span> (sys_err_code)</div>
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno">  530</span>  {</div>
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno">  531</span>    FLOW_LOG_FATAL(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: Constructing: connect-pipe failed.  Details follow.&quot;</span>);</div>
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno">  532</span>    FLOW_ERROR_SYS_ERROR_LOG_FATAL();</div>
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno">  533</span>    assert(<span class="keyword">false</span> &amp;&amp; <span class="stringliteral">&quot;We chose not to complicate the code given how unlikely this is, and how hosed you&#39;d have to be.&quot;</span>);</div>
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno">  534</span>    std::abort();</div>
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno">  535</span>  }</div>
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno">  536</span> </div>
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno">  537</span>  ev_wait_hndl-&gt;<a class="code hl_function" href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html#a7d28277f9ef090032b0483c65f79f23c">assign</a>(<a class="code hl_typedef" href="namespaceipc_1_1transport.html#a7ee4551983d9df16ec16a3139bac50e8">Native_handle</a>(reader-&gt;native_handle()));</div>
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno">  538</span>}</div>
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno">  539</span> </div>
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno">  540</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno">  541</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Event_wait_func_t&gt;</div>
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ac9ff4515c84ff66ae8eafbf102c83df0">  542</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ac9ff4515c84ff66ae8eafbf102c83df0">Session_adapter&lt;Session&gt;::start_ops</a>(Event_wait_func_t&amp;&amp; ev_wait_func)</div>
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno">  543</span>{</div>
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno">  544</span>  <span class="keyword">using </span><a class="code hl_typedef" href="namespaceipc_1_1util.html#a31e67d3a017477a04b313927e2f2c733">util::Task</a>;</div>
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno">  545</span> </div>
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno">  546</span>  <span class="keywordflow">if</span> (!m_ev_wait_func.empty())</div>
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno">  547</span>  {</div>
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno">  548</span>    FLOW_LOG_WARNING(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: Start-ops requested, &quot;</span></div>
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno">  549</span>                     <span class="stringliteral">&quot;but we are already started.  Probably a user bug, but it is not for us to judge.&quot;</span>);</div>
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno">  550</span>    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno">  551</span>  }</div>
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno">  552</span>  <span class="comment">// else</span></div>
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno">  553</span> </div>
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno">  554</span>  m_ev_wait_func = std::move(ev_wait_func);</div>
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno">  555</span> </div>
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno">  556</span>  <span class="comment">/* No time to waste!  on_err_func_sio() and on_channel_func_sio() had to have been called already; begin waiting</span></div>
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno">  557</span><span class="comment">   * for those events to be indicated via our IPC-pipes as set up in those methods. */</span></div>
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno">  558</span> </div>
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno">  559</span>  async_wait(&amp;m_ev_wait_hndl_err,</div>
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno">  560</span>             <span class="keyword">false</span>, <span class="comment">// Wait for read.</span></div>
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno">  561</span>             boost::make_shared&lt;Task&gt;([<span class="keyword">this</span>]()</div>
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno">  562</span>  {</div>
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno">  563</span>    FLOW_LOG_INFO(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: Async-IO core on-error event: informed via IPC-pipe; &quot;</span></div>
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno">  564</span>                  <span class="stringliteral">&quot;invoking handler.&quot;</span>);</div>
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno">  565</span>    <a class="code hl_function" href="namespaceipc_1_1util.html#a814272e555c0592b0caf92b7bc3d64b3">util::pipe_consume</a>(get_logger(), &amp;m_ready_reader_err); <span class="comment">// No need really -- it&#39;s a one-time thing -- but just....</span></div>
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno">  566</span> </div>
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno">  567</span>    <span class="keyword">auto</span> on_done_func = std::move(m_on_err_func);</div>
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno">  568</span>    m_on_err_func.clear(); <span class="comment">// In case move() didn&#39;t do it.  Might as well forget it.</span></div>
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno">  569</span> </div>
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno">  570</span>    on_done_func(m_target_err_code_err);</div>
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno">  571</span>    FLOW_LOG_TRACE(<span class="stringliteral">&quot;Handler completed.&quot;</span>);</div>
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno">  572</span>  }));</div>
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno">  573</span> </div>
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno">  574</span>  <span class="comment">/* Subtlety: It is tempting to guard this with `if (!m_on_channel_func_or_empty.empty()) {}` in the effort to</span></div>
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno">  575</span><span class="comment">   * avoid an an async-wait that will never get satisfied.  However that only works in the Client_session case,</span></div>
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno">  576</span><span class="comment">   * when m_on_channel_func_or_empty is known from ction.  Server_session still needs init_handlers() by user,</span></div>
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno">  577</span><span class="comment">   * and indeed that would be after start_ops(), so =&gt; bug.  We could add fancier logic to account for this,</span></div>
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno">  578</span><span class="comment">   * but who really cares?  So it&#39;ll register an extra FD in some boost.asio epoll-set.  Meh. */</span></div>
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno">  579</span>  async_wait(&amp;m_ev_wait_hndl_chan,</div>
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno">  580</span>             <span class="keyword">false</span>, <span class="comment">// Wait for read.</span></div>
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno">  581</span>             boost::make_shared&lt;Task&gt;([<span class="keyword">this</span>]() { on_ev_channel_open(); }));</div>
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno">  582</span> </div>
<div class="line"><a id="l00583" name="l00583"></a><span class="lineno">  583</span>  FLOW_LOG_INFO(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: Start-ops requested.  Done.&quot;</span>);</div>
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno">  584</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno">  585</span>} <span class="comment">// Session_adapter::start_ops()</span></div>
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno">  586</span> </div>
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno">  587</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a49853cc0cc44d2bb3ee20823d2b02ff5">  588</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a49853cc0cc44d2bb3ee20823d2b02ff5">Session_adapter&lt;Session&gt;::on_ev_channel_open</a>()</div>
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno">  589</span>{</div>
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno">  590</span>  <span class="keyword">using </span><a class="code hl_typedef" href="namespaceipc_1_1util.html#a31e67d3a017477a04b313927e2f2c733">util::Task</a>;</div>
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno">  591</span>  <span class="keyword">using </span>flow::util::Lock_guard;</div>
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno">  592</span> </div>
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno">  593</span>  <span class="comment">// We are in user calling thread.</span></div>
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno">  594</span> </div>
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno">  595</span>  <span class="keyword">typename</span> <a class="code hl_typedef" href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a66d9fad46eb4c59bee360b92d1763b92">Channel_open_result::Ptr</a> result;</div>
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno">  596</span>  {</div>
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno">  597</span>    Lock_guard&lt;<span class="keyword">decltype</span>(m_target_channel_open_q_mutex)&gt; lock(m_target_channel_open_q_mutex);</div>
<div class="line"><a id="l00598" name="l00598"></a><span class="lineno">  598</span> </div>
<div class="line"><a id="l00599" name="l00599"></a><span class="lineno">  599</span>    FLOW_LOG_INFO(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: Async-IO core passively-opened channel event: &quot;</span></div>
<div class="line"><a id="l00600" name="l00600"></a><span class="lineno">  600</span>                  <span class="stringliteral">&quot;informed via IPC-pipe; invoking handler.  Including this one &quot;</span></div>
<div class="line"><a id="l00601" name="l00601"></a><span class="lineno">  601</span>                  <span class="stringliteral">&quot;[&quot;</span> &lt;&lt; m_target_channel_open_q.size() &lt;&lt; <span class="stringliteral">&quot;] are pending.&quot;</span>);</div>
<div class="line"><a id="l00602" name="l00602"></a><span class="lineno">  602</span> </div>
<div class="line"><a id="l00603" name="l00603"></a><span class="lineno">  603</span>    assert((!m_target_channel_open_q.empty())</div>
<div class="line"><a id="l00604" name="l00604"></a><span class="lineno">  604</span>           &amp;&amp; <span class="stringliteral">&quot;Algorithm bug?  Result-queue elements and pipe signal bytes must be 1-1, so either something &quot;</span></div>
<div class="line"><a id="l00605" name="l00605"></a><span class="lineno">  605</span>              <span class="stringliteral">&quot;failed to correctly push, or something overzealously popped.&quot;</span>);</div>
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno">  606</span> </div>
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno">  607</span>    result = std::move(m_target_channel_open_q.front());</div>
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno">  608</span>    m_target_channel_open_q.pop();</div>
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno">  609</span>  } <span class="comment">// Lock_guard lock(m_target_channel_open_q_mutex);</span></div>
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno">  610</span> </div>
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno">  611</span>  m_on_channel_func_or_empty(std::move(result-&gt;m_channel), std::move(result-&gt;m_mdt_reader_ptr));</div>
<div class="line"><a id="l00612" name="l00612"></a><span class="lineno">  612</span>  FLOW_LOG_TRACE(<span class="stringliteral">&quot;Handler completed.  Beginning next async-wait immediately.  If more is/are pending &quot;</span></div>
<div class="line"><a id="l00613" name="l00613"></a><span class="lineno">  613</span>                 <span class="stringliteral">&quot;it/they&#39;ll be popped quickly due to immediately-completing async-wait(s).&quot;</span>);</div>
<div class="line"><a id="l00614" name="l00614"></a><span class="lineno">  614</span> </div>
<div class="line"><a id="l00615" name="l00615"></a><span class="lineno">  615</span>  <a class="code hl_function" href="namespaceipc_1_1util.html#a814272e555c0592b0caf92b7bc3d64b3">util::pipe_consume</a>(get_logger(), &amp;m_ready_reader_chan);</div>
<div class="line"><a id="l00616" name="l00616"></a><span class="lineno">  616</span>  async_wait(&amp;m_ev_wait_hndl_chan,</div>
<div class="line"><a id="l00617" name="l00617"></a><span class="lineno">  617</span>             <span class="keyword">false</span>, <span class="comment">// Wait for read -- again.</span></div>
<div class="line"><a id="l00618" name="l00618"></a><span class="lineno">  618</span>             boost::make_shared&lt;Task&gt;([<span class="keyword">this</span>]() { on_ev_channel_open(); }));</div>
<div class="line"><a id="l00619" name="l00619"></a><span class="lineno">  619</span>} <span class="comment">// Session_adapter::on_ev_channel_open()</span></div>
<div class="line"><a id="l00620" name="l00620"></a><span class="lineno">  620</span> </div>
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno">  621</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00622" name="l00622"></a><span class="lineno">  622</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Create_ev_wait_hndl_func&gt;</div>
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6936f814627243f273d700750def19e2">  623</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6936f814627243f273d700750def19e2">Session_adapter&lt;Session&gt;::replace_event_wait_handles</a>(<span class="keyword">const</span> Create_ev_wait_hndl_func&amp; create_ev_wait_hndl_func)</div>
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno">  624</span>{</div>
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno">  625</span>  <span class="keyword">using </span><a class="code hl_struct" href="structipc_1_1util_1_1Native__handle.html">util::Native_handle</a>;</div>
<div class="line"><a id="l00626" name="l00626"></a><span class="lineno">  626</span> </div>
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno">  627</span>  <span class="keywordflow">if</span> (!m_ev_wait_func.empty())</div>
<div class="line"><a id="l00628" name="l00628"></a><span class="lineno">  628</span>  {</div>
<div class="line"><a id="l00629" name="l00629"></a><span class="lineno">  629</span>    FLOW_LOG_WARNING(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: Cannot replace event-wait handles after &quot;</span></div>
<div class="line"><a id="l00630" name="l00630"></a><span class="lineno">  630</span>                     <span class="stringliteral">&quot;a start-*-ops procedure has been executed.  Ignoring.&quot;</span>);</div>
<div class="line"><a id="l00631" name="l00631"></a><span class="lineno">  631</span>    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00632" name="l00632"></a><span class="lineno">  632</span>  }</div>
<div class="line"><a id="l00633" name="l00633"></a><span class="lineno">  633</span>  <span class="comment">// else</span></div>
<div class="line"><a id="l00634" name="l00634"></a><span class="lineno">  634</span> </div>
<div class="line"><a id="l00635" name="l00635"></a><span class="lineno">  635</span>  FLOW_LOG_INFO(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: Replacing event-wait handles (probably to replace underlying &quot;</span></div>
<div class="line"><a id="l00636" name="l00636"></a><span class="lineno">  636</span>                <span class="stringliteral">&quot;execution context without outside event loop&#39;s boost.asio Task_engine or similar).&quot;</span>);</div>
<div class="line"><a id="l00637" name="l00637"></a><span class="lineno">  637</span> </div>
<div class="line"><a id="l00638" name="l00638"></a><span class="lineno">  638</span>  assert(m_ev_wait_hndl_err.is_open());</div>
<div class="line"><a id="l00639" name="l00639"></a><span class="lineno">  639</span>  assert(m_ev_wait_hndl_chan.is_open());</div>
<div class="line"><a id="l00640" name="l00640"></a><span class="lineno">  640</span> </div>
<div class="line"><a id="l00641" name="l00641"></a><span class="lineno">  641</span>  <a class="code hl_typedef" href="namespaceipc_1_1transport.html#a7ee4551983d9df16ec16a3139bac50e8">Native_handle</a> saved(m_ev_wait_hndl_err.release());</div>
<div class="line"><a id="l00642" name="l00642"></a><span class="lineno">  642</span>  m_ev_wait_hndl_err = create_ev_wait_hndl_func();</div>
<div class="line"><a id="l00643" name="l00643"></a><span class="lineno">  643</span>  m_ev_wait_hndl_err.assign(saved);</div>
<div class="line"><a id="l00644" name="l00644"></a><span class="lineno">  644</span> </div>
<div class="line"><a id="l00645" name="l00645"></a><span class="lineno">  645</span>  saved = m_ev_wait_hndl_chan.release();</div>
<div class="line"><a id="l00646" name="l00646"></a><span class="lineno">  646</span>  m_ev_wait_hndl_chan = create_ev_wait_hndl_func();</div>
<div class="line"><a id="l00647" name="l00647"></a><span class="lineno">  647</span>  m_ev_wait_hndl_chan.assign(saved);</div>
<div class="line"><a id="l00648" name="l00648"></a><span class="lineno">  648</span> </div>
<div class="line"><a id="l00649" name="l00649"></a><span class="lineno">  649</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00650" name="l00650"></a><span class="lineno">  650</span>} <span class="comment">// Session_adapter::replace_event_wait_handles()</span></div>
<div class="line"><a id="l00651" name="l00651"></a><span class="lineno">  651</span> </div>
<div class="line"><a id="l00652" name="l00652"></a><span class="lineno">  652</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00653" name="l00653"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a5bbcf8b33bc02ccb371449692d09e642">  653</a></span>flow::async::Task_asio_err <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a5bbcf8b33bc02ccb371449692d09e642">Session_adapter&lt;Session&gt;::on_err_func_sio</a>()</div>
<div class="line"><a id="l00654" name="l00654"></a><span class="lineno">  654</span>{</div>
<div class="line"><a id="l00655" name="l00655"></a><span class="lineno">  655</span>  <span class="keyword">using </span>flow::async::Task_asio_err;</div>
<div class="line"><a id="l00656" name="l00656"></a><span class="lineno">  656</span> </div>
<div class="line"><a id="l00657" name="l00657"></a><span class="lineno">  657</span>  <span class="comment">// Careful in here!  *this may not have been constructed yet.</span></div>
<div class="line"><a id="l00658" name="l00658"></a><span class="lineno">  658</span> </div>
<div class="line"><a id="l00659" name="l00659"></a><span class="lineno">  659</span>  <span class="keywordflow">return</span> [<span class="keyword">this</span>](<span class="keyword">const</span> <a class="code hl_typedef" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89">Error_code</a>&amp; err_code)</div>
<div class="line"><a id="l00660" name="l00660"></a><span class="lineno">  660</span>  {</div>
<div class="line"><a id="l00661" name="l00661"></a><span class="lineno">  661</span>    FLOW_LOG_INFO(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: Async-IO core reports on-error event: tickling IPC-pipe to &quot;</span></div>
<div class="line"><a id="l00662" name="l00662"></a><span class="lineno">  662</span>                  <span class="stringliteral">&quot;inform user.&quot;</span>);</div>
<div class="line"><a id="l00663" name="l00663"></a><span class="lineno">  663</span> </div>
<div class="line"><a id="l00664" name="l00664"></a><span class="lineno">  664</span>    assert((!m_target_err_code_err)</div>
<div class="line"><a id="l00665" name="l00665"></a><span class="lineno">  665</span>           &amp;&amp; <span class="stringliteral">&quot;Error handler must never fire more than once per Session!  Bug in the particular Session_obj type?&quot;</span>);</div>
<div class="line"><a id="l00666" name="l00666"></a><span class="lineno">  666</span>    m_target_err_code_err = err_code;</div>
<div class="line"><a id="l00667" name="l00667"></a><span class="lineno">  667</span> </div>
<div class="line"><a id="l00668" name="l00668"></a><span class="lineno">  668</span>    <a class="code hl_function" href="namespaceipc_1_1util.html#a5429c6225cc9a271ad8c0041d99c236b">util::pipe_produce</a>(get_logger(), &amp;m_ready_writer_err);</div>
<div class="line"><a id="l00669" name="l00669"></a><span class="lineno">  669</span>  };</div>
<div class="line"><a id="l00670" name="l00670"></a><span class="lineno">  670</span> </div>
<div class="line"><a id="l00671" name="l00671"></a><span class="lineno">  671</span>  <span class="comment">// start_ops() will set up the (1-time) async-wait for m_ready_reader_err being readable.</span></div>
<div class="line"><a id="l00672" name="l00672"></a><span class="lineno">  672</span>} <span class="comment">// Session_adapter::on_err_func_sio()</span></div>
<div class="line"><a id="l00673" name="l00673"></a><span class="lineno">  673</span> </div>
<div class="line"><a id="l00674" name="l00674"></a><span class="lineno">  674</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00675" name="l00675"></a><span class="lineno">  675</span><span class="keyword">typename</span> <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab0028c9cad3d0d254b3cbb20d27e0c48">Session_adapter&lt;Session&gt;::On_channel_func</a></div>
<div class="line"><a id="l00676" name="l00676"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a527ef097783127e73184258166a891a3">  676</a></span>  <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a527ef097783127e73184258166a891a3">Session_adapter&lt;Session&gt;::on_channel_func_sio</a>()</div>
<div class="line"><a id="l00677" name="l00677"></a><span class="lineno">  677</span>{</div>
<div class="line"><a id="l00678" name="l00678"></a><span class="lineno">  678</span>  <span class="keyword">using </span>flow::util::Lock_guard;</div>
<div class="line"><a id="l00679" name="l00679"></a><span class="lineno">  679</span> </div>
<div class="line"><a id="l00680" name="l00680"></a><span class="lineno">  680</span>  <span class="comment">// Careful in here!  *this may not have been constructed yet.</span></div>
<div class="line"><a id="l00681" name="l00681"></a><span class="lineno">  681</span> </div>
<div class="line"><a id="l00682" name="l00682"></a><span class="lineno">  682</span>  <span class="keywordflow">return</span> [<span class="keyword">this</span>](<a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a3c0cceec02c1870cf23d6788f19ed083">Channel_obj</a>&amp;&amp; new_channel, <a class="code hl_typedef" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a47d8e7dccbe05a7834e4b9687b755a2b">Mdt_reader_ptr</a>&amp;&amp; new_channel_mdt)</div>
<div class="line"><a id="l00683" name="l00683"></a><span class="lineno">  683</span>  {</div>
<div class="line"><a id="l00684" name="l00684"></a><span class="lineno">  684</span>    <span class="comment">// We are in Client_session_mv/Server_session_mv &quot;unspecified&quot; worker thread (called thread W in internal docs).</span></div>
<div class="line"><a id="l00685" name="l00685"></a><span class="lineno">  685</span>    {</div>
<div class="line"><a id="l00686" name="l00686"></a><span class="lineno">  686</span>      Lock_guard&lt;<span class="keyword">decltype</span>(m_target_channel_open_q_mutex)&gt; lock(m_target_channel_open_q_mutex);</div>
<div class="line"><a id="l00687" name="l00687"></a><span class="lineno">  687</span> </div>
<div class="line"><a id="l00688" name="l00688"></a><span class="lineno">  688</span>      FLOW_LOG_INFO(<span class="stringliteral">&quot;Session_adapter [&quot;</span> &lt;&lt; m_async_io &lt;&lt; <span class="stringliteral">&quot;]: Async-IO core reports passively-opened channel event: &quot;</span></div>
<div class="line"><a id="l00689" name="l00689"></a><span class="lineno">  689</span>                    <span class="stringliteral">&quot;tickling IPC-pipe to inform user.  This will make the # of pending such events &quot;</span></div>
<div class="line"><a id="l00690" name="l00690"></a><span class="lineno">  690</span>                    <span class="stringliteral">&quot;[&quot;</span> &lt;&lt; (m_target_channel_open_q.size() + 1) &lt;&lt; <span class="stringliteral">&quot;].&quot;</span>);</div>
<div class="line"><a id="l00691" name="l00691"></a><span class="lineno">  691</span>      m_target_channel_open_q.emplace(boost::movelib::make_unique&lt;Channel_open_result&gt;());</div>
<div class="line"><a id="l00692" name="l00692"></a><span class="lineno">  692</span>      <span class="keyword">auto</span>&amp; result = *(m_target_channel_open_q.back());</div>
<div class="line"><a id="l00693" name="l00693"></a><span class="lineno">  693</span>      result.m_channel = std::move(new_channel);</div>
<div class="line"><a id="l00694" name="l00694"></a><span class="lineno">  694</span>      result.m_mdt_reader_ptr = std::move(new_channel_mdt);</div>
<div class="line"><a id="l00695" name="l00695"></a><span class="lineno">  695</span>    } <span class="comment">// Lock_guard lock(m_target_channel_open_q_mutex);</span></div>
<div class="line"><a id="l00696" name="l00696"></a><span class="lineno">  696</span> </div>
<div class="line"><a id="l00697" name="l00697"></a><span class="lineno">  697</span>    <span class="comment">/* By Session contract, handlers are never called concurrently with each other.  Though this</span></div>
<div class="line"><a id="l00698" name="l00698"></a><span class="lineno">  698</span><span class="comment">     * in POSIX is thread-safe even otherwise (w/r/t another pipe_produce() and most certainly w/r/t</span></div>
<div class="line"><a id="l00699" name="l00699"></a><span class="lineno">  699</span><span class="comment">     * pipe_consume() of the other end). */</span></div>
<div class="line"><a id="l00700" name="l00700"></a><span class="lineno">  700</span>    <a class="code hl_function" href="namespaceipc_1_1util.html#a5429c6225cc9a271ad8c0041d99c236b">util::pipe_produce</a>(get_logger(), &amp;m_ready_writer_chan);</div>
<div class="line"><a id="l00701" name="l00701"></a><span class="lineno">  701</span>  }; <span class="comment">// return [](){}</span></div>
<div class="line"><a id="l00702" name="l00702"></a><span class="lineno">  702</span> </div>
<div class="line"><a id="l00703" name="l00703"></a><span class="lineno">  703</span>  <span class="comment">/* start_ops() will set up the (first) async-wait for m_ready_reader_err being readable, as well as</span></div>
<div class="line"><a id="l00704" name="l00704"></a><span class="lineno">  704</span><span class="comment">   * the action on that wait being satisfied; namely: to pipe_consume() that signal + begin the next wait. */</span></div>
<div class="line"><a id="l00705" name="l00705"></a><span class="lineno">  705</span>} <span class="comment">// Session_adapter::on_channel_func_sio()</span></div>
<div class="line"><a id="l00706" name="l00706"></a><span class="lineno">  706</span> </div>
<div class="line"><a id="l00707" name="l00707"></a><span class="lineno">  707</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00708" name="l00708"></a><span class="lineno">  708</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span>... Args&gt;</div>
<div class="line"><a id="l00709" name="l00709"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6a7dada7f109cd5bd999d3c08e20b179">  709</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6a7dada7f109cd5bd999d3c08e20b179">Session_adapter&lt;Session&gt;::async_wait</a>(Args&amp;&amp;... args)</div>
<div class="line"><a id="l00710" name="l00710"></a><span class="lineno">  710</span>{</div>
<div class="line"><a id="l00711" name="l00711"></a><span class="lineno">  711</span>  m_ev_wait_func(std::forward&lt;Args&gt;(args)...);</div>
<div class="line"><a id="l00712" name="l00712"></a><span class="lineno">  712</span>}</div>
<div class="line"><a id="l00713" name="l00713"></a><span class="lineno">  713</span> </div>
<div class="line"><a id="l00714" name="l00714"></a><span class="lineno">  714</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00715" name="l00715"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a93fc44829d49b7633d1dddfab7998f78">  715</a></span><span class="keyword">typename</span> <a class="code hl_class" href="classipc_1_1session_1_1Session.html">Session_adapter&lt;Session&gt;::Session_obj</a>* <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a93fc44829d49b7633d1dddfab7998f78">Session_adapter&lt;Session&gt;::core</a>()</div>
<div class="line"><a id="l00716" name="l00716"></a><span class="lineno">  716</span>{</div>
<div class="line"><a id="l00717" name="l00717"></a><span class="lineno">  717</span>  <span class="keywordflow">return</span> &amp;m_async_io;</div>
<div class="line"><a id="l00718" name="l00718"></a><span class="lineno">  718</span>}</div>
<div class="line"><a id="l00719" name="l00719"></a><span class="lineno">  719</span> </div>
<div class="line"><a id="l00720" name="l00720"></a><span class="lineno">  720</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00721" name="l00721"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a09c4ae70bece68246e64449169787a6b">  721</a></span><span class="keyword">const</span> <span class="keyword">typename</span> <a class="code hl_class" href="classipc_1_1session_1_1Session.html">Session_adapter&lt;Session&gt;::Session_obj</a>* <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a93fc44829d49b7633d1dddfab7998f78">Session_adapter&lt;Session&gt;::core</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00722" name="l00722"></a><span class="lineno">  722</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00723" name="l00723"></a><span class="lineno">  723</span>  <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span><a class="code hl_class" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html">Session_adapter</a>*<span class="keyword">&gt;</span>(<span class="keyword">this</span>)-&gt;core();</div>
<div class="line"><a id="l00724" name="l00724"></a><span class="lineno">  724</span>}</div>
<div class="line"><a id="l00725" name="l00725"></a><span class="lineno">  725</span> </div>
<div class="line"><a id="l00726" name="l00726"></a><span class="lineno">  726</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00727" name="l00727"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab779934fe031f22ed0223610cc4c9cf0">  727</a></span>flow::log::Logger* <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab779934fe031f22ed0223610cc4c9cf0">Session_adapter&lt;Session&gt;::get_logger</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00728" name="l00728"></a><span class="lineno">  728</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00729" name="l00729"></a><span class="lineno">  729</span>  <span class="keywordflow">return</span> core()-&gt;get_logger();</div>
<div class="line"><a id="l00730" name="l00730"></a><span class="lineno">  730</span>}</div>
<div class="line"><a id="l00731" name="l00731"></a><span class="lineno">  731</span> </div>
<div class="line"><a id="l00732" name="l00732"></a><span class="lineno">  732</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> Session&gt;</div>
<div class="line"><a id="l00733" name="l00733"></a><span class="lineno"><a class="line" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a119e8c2b3a76498aa239c43e050fd349">  733</a></span><span class="keyword">const</span> flow::log::Component&amp; <a class="code hl_function" href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a119e8c2b3a76498aa239c43e050fd349">Session_adapter&lt;Session&gt;::get_log_component</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00734" name="l00734"></a><span class="lineno">  734</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00735" name="l00735"></a><span class="lineno">  735</span>  <span class="keywordflow">return</span> core()-&gt;get_log_component();</div>
<div class="line"><a id="l00736" name="l00736"></a><span class="lineno">  736</span>}</div>
<div class="line"><a id="l00737" name="l00737"></a><span class="lineno">  737</span> </div>
<div class="line"><a id="l00738" name="l00738"></a><span class="lineno">  738</span>} <span class="comment">// namespace ipc::session::sync_io</span></div>
<div class="ttc" id="aclassipc_1_1session_1_1Session_html"><div class="ttname"><a href="classipc_1_1session_1_1Session.html">ipc::session::Session</a></div><div class="ttdoc">A documentation-only concept defining the local side of an IPC conversation (session) with another en...</div><div class="ttdef"><b>Definition:</b> <a href="ipc__session_2src_2ipc_2session_2session_8hpp_source.html#l00215">session.hpp:216</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1Session_html_a2f770785552536f3b929f293c44834d2"><div class="ttname"><a href="classipc_1_1session_1_1Session.html#a2f770785552536f3b929f293c44834d2">ipc::session::Session::Channel_obj</a></div><div class="ttdeci">unspecified Channel_obj</div><div class="ttdoc">Each successful open_channel() and on-passive-open handler firing shall yield a concrete transport::C...</div><div class="ttdef"><b>Definition:</b> <a href="ipc__session_2src_2ipc_2session_2session_8hpp_source.html#l00235">session.hpp:235</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1Session_html_ae197d051e06be6f132e193e9ba7ab6ae"><div class="ttname"><a href="classipc_1_1session_1_1Session.html#ae197d051e06be6f132e193e9ba7ab6ae">ipc::session::Session::Mdt_reader_ptr</a></div><div class="ttdeci">shared_ptr&lt; typename transport::struc::schema::Metadata&lt; Mdt_payload_obj &gt;::Reader &gt; Mdt_reader_ptr</div><div class="ttdoc">Ref-counted handle to a capnp-generated Reader (and the payload it accesses) through which the user s...</div><div class="ttdef"><b>Definition:</b> <a href="ipc__session_2src_2ipc_2session_2session_8hpp_source.html#l00261">session.hpp:262</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Client__session__adapter_html_a5ea8209bc1286af653783eb043ec0629"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Client__session__adapter.html#a5ea8209bc1286af653783eb043ec0629">ipc::session::sync_io::Client_session_adapter::Session_obj</a></div><div class="ttdeci">typename Base::Session_obj Session_obj</div><div class="ttdoc">Short-hand, for generic programming et al, for template parameter Session.</div><div class="ttdef"><b>Definition:</b> <a href="client__session__adapter_8hpp_source.html#l00097">client_session_adapter.hpp:97</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html">ipc::session::sync_io::Session_adapter</a></div><div class="ttdoc">Internal-use workhorse containing common elements of Client_session_adapter and Server_session_adapte...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00051">session_adapter.hpp:52</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a00009e3a7b3a9643af82469ec9647679"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a00009e3a7b3a9643af82469ec9647679">ipc::session::sync_io::Session_adapter::m_on_err_func</a></div><div class="ttdeci">flow::async::Task_asio_err m_on_err_func</div><div class="ttdoc">on_err_func from init_handlers(); .empty() until then.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00366">session_adapter.hpp:366</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a119e8c2b3a76498aa239c43e050fd349"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a119e8c2b3a76498aa239c43e050fd349">ipc::session::sync_io::Session_adapter::get_log_component</a></div><div class="ttdeci">const flow::log::Component &amp; get_log_component() const</div><div class="ttdoc">See flow::log::Log_context.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00733">session_adapter.hpp:733</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a22c47810c9273ce7f86b85f51c474b9f"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a22c47810c9273ce7f86b85f51c474b9f">ipc::session::sync_io::Session_adapter::m_ready_writer_err</a></div><div class="ttdeci">util::Pipe_writer m_ready_writer_err</div><div class="ttdoc">Write-end of IPC-pipe together with m_ready_reader_err.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00325">session_adapter.hpp:325</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a23a9d957374f24739147bbda694e7b8b"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a23a9d957374f24739147bbda694e7b8b">ipc::session::sync_io::Session_adapter::m_ev_wait_hndl_err</a></div><div class="ttdeci">util::sync_io::Asio_waitable_native_handle m_ev_wait_hndl_err</div><div class="ttdoc">Descriptor waitable by outside event loop async-waits – storing the same Native_handle as (and thus b...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00331">session_adapter.hpp:331</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a3c0cceec02c1870cf23d6788f19ed083"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a3c0cceec02c1870cf23d6788f19ed083">ipc::session::sync_io::Session_adapter::Channel_obj</a></div><div class="ttdeci">typename Session_obj::Channel_obj Channel_obj</div><div class="ttdoc">Short-hand for session-openable Channel type.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00065">session_adapter.hpp:65</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a47d8e7dccbe05a7834e4b9687b755a2b"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a47d8e7dccbe05a7834e4b9687b755a2b">ipc::session::sync_io::Session_adapter::Mdt_reader_ptr</a></div><div class="ttdeci">typename Session_obj::Mdt_reader_ptr Mdt_reader_ptr</div><div class="ttdoc">Short-hand for session-open metadata reader.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00068">session_adapter.hpp:68</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a48b4b10dcb605860a58d2a394ba9c35b"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a48b4b10dcb605860a58d2a394ba9c35b">ipc::session::sync_io::Session_adapter::init_pipe</a></div><div class="ttdeci">void init_pipe(util::Pipe_reader *reader, util::Pipe_writer *writer, util::sync_io::Asio_waitable_native_handle *ev_wait_hndl)</div><div class="ttdoc">Utility that sets up an IPC-pipe in the given peer objects as well as loading a watcher-descriptor ob...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00520">session_adapter.hpp:520</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a49853cc0cc44d2bb3ee20823d2b02ff5"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a49853cc0cc44d2bb3ee20823d2b02ff5">ipc::session::sync_io::Session_adapter::on_ev_channel_open</a></div><div class="ttdeci">void on_ev_channel_open()</div><div class="ttdoc">Signaled by the function returned by on_channel_func_sio(), it returns the IPC-pipe to steady-state (...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00588">session_adapter.hpp:588</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a527ef097783127e73184258166a891a3"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a527ef097783127e73184258166a891a3">ipc::session::sync_io::Session_adapter::on_channel_func_sio</a></div><div class="ttdeci">On_channel_func on_channel_func_sio()</div><div class="ttdoc">Returns the proper on-passive-channel-open handler to set up on the underlying Session_obj (Client_se...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00676">session_adapter.hpp:676</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a5bbcf8b33bc02ccb371449692d09e642"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a5bbcf8b33bc02ccb371449692d09e642">ipc::session::sync_io::Session_adapter::on_err_func_sio</a></div><div class="ttdeci">flow::async::Task_asio_err on_err_func_sio()</div><div class="ttdoc">Returns the proper on-error handler to set up on the underlying Session_obj (Client_session: via ctor...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00653">session_adapter.hpp:653</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a6936f814627243f273d700750def19e2"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6936f814627243f273d700750def19e2">ipc::session::sync_io::Session_adapter::replace_event_wait_handles</a></div><div class="ttdeci">bool replace_event_wait_handles(const Create_ev_wait_hndl_func &amp;create_ev_wait_hndl_func)</div><div class="ttdoc">See, e.g., Client_session_adapter.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00623">session_adapter.hpp:623</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a698532c47d2962e7e60dc804ac5c4e53"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a698532c47d2962e7e60dc804ac5c4e53">ipc::session::sync_io::Session_adapter::m_target_err_code_err</a></div><div class="ttdeci">Error_code m_target_err_code_err</div><div class="ttdoc">Result given to (or about to be given to) m_on_err_func.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00375">session_adapter.hpp:375</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a6a7dada7f109cd5bd999d3c08e20b179"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6a7dada7f109cd5bd999d3c08e20b179">ipc::session::sync_io::Session_adapter::async_wait</a></div><div class="ttdeci">void async_wait(Args &amp;&amp;... args)</div><div class="ttdoc">Forwards to the util::sync_io::Event_wait_func saved in start_ops().</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00709">session_adapter.hpp:709</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a6ea8f9f021af50050dbb88bd14978e24"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a6ea8f9f021af50050dbb88bd14978e24">ipc::session::sync_io::Session_adapter::m_ready_reader_err</a></div><div class="ttdeci">util::Pipe_reader m_ready_reader_err</div><div class="ttdoc">Read-end of IPC-pipe used by *this used to detect that the error-wait has completed.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00322">session_adapter.hpp:322</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a7212b0336f96d32d6ab36ef43e16135a"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a7212b0336f96d32d6ab36ef43e16135a">ipc::session::sync_io::Session_adapter::m_target_channel_open_q_mutex</a></div><div class="ttdeci">flow::util::Mutex_non_recursive m_target_channel_open_q_mutex</div><div class="ttdoc">Protects m_target_channel_open_q, accessed from user async-wait-reporter thread; and Session_obj work...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00413">session_adapter.hpp:413</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a8b4dada833c59e6a63780dfaba4f704f"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8b4dada833c59e6a63780dfaba4f704f">ipc::session::sync_io::Session_adapter::Session_adapter</a></div><div class="ttdeci">Session_adapter()</div><div class="ttdoc">Forwards to the Session_obj default ctor.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00422">session_adapter.hpp:422</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a8e4d1659efd084274bcea1bbcee88533"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a8e4d1659efd084274bcea1bbcee88533">ipc::session::sync_io::Session_adapter::m_ev_wait_hndl_chan</a></div><div class="ttdeci">util::sync_io::Asio_waitable_native_handle m_ev_wait_hndl_chan</div><div class="ttdoc">Descriptor waitable by outside event loop async-waits – storing the same Native_handle as (and thus b...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00356">session_adapter.hpp:356</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a93fc44829d49b7633d1dddfab7998f78"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a93fc44829d49b7633d1dddfab7998f78">ipc::session::sync_io::Session_adapter::core</a></div><div class="ttdeci">Session_obj * core()</div><div class="ttdoc">The adapted mutable Session_obj.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00715">session_adapter.hpp:715</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_a95ca5ad4d856f3921b9e0b3accf7b618"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#a95ca5ad4d856f3921b9e0b3accf7b618">ipc::session::sync_io::Session_adapter::m_ready_reader_chan</a></div><div class="ttdeci">util::Pipe_reader m_ready_reader_chan</div><div class="ttdoc">Read-end of IPC-pipe used by *this used to detect that a channel-open-wait has completed.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00347">session_adapter.hpp:347</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_ab0028c9cad3d0d254b3cbb20d27e0c48"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab0028c9cad3d0d254b3cbb20d27e0c48">ipc::session::sync_io::Session_adapter::On_channel_func</a></div><div class="ttdeci">Function&lt; void(Channel_obj &amp;&amp;, Mdt_reader_ptr &amp;&amp;)&gt; On_channel_func</div><div class="ttdoc">Short-hand for passive-channel-open handler.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00071">session_adapter.hpp:71</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_ab779934fe031f22ed0223610cc4c9cf0"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ab779934fe031f22ed0223610cc4c9cf0">ipc::session::sync_io::Session_adapter::get_logger</a></div><div class="ttdeci">flow::log::Logger * get_logger() const</div><div class="ttdoc">See flow::log::Log_context.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00727">session_adapter.hpp:727</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_abc472aaaad1fd0f07ebb0e2be5c6ac76"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#abc472aaaad1fd0f07ebb0e2be5c6ac76">ipc::session::sync_io::Session_adapter::Session_obj</a></div><div class="ttdeci">Session Session_obj</div><div class="ttdoc">See, e.g., Client_session_adapter.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00057">session_adapter.hpp:57</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_ac9ff4515c84ff66ae8eafbf102c83df0"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ac9ff4515c84ff66ae8eafbf102c83df0">ipc::session::sync_io::Session_adapter::start_ops</a></div><div class="ttdeci">bool start_ops(Event_wait_func_t &amp;&amp;ev_wait_func)</div><div class="ttdoc">See, e.g., Client_session_adapter.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00542">session_adapter.hpp:542</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_acff016523b1b1cff00f6d44a47cc9426"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#acff016523b1b1cff00f6d44a47cc9426">ipc::session::sync_io::Session_adapter::m_async_io</a></div><div class="ttdeci">Async_io_obj m_async_io</div><div class="ttdoc">This guy does all the work. In our dtor this will be destroyed (hence thread stopped) first-thing.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00416">session_adapter.hpp:416</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_ad234c5fbbbd01b0c8b3f3edfa02f1cb0"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ad234c5fbbbd01b0c8b3f3edfa02f1cb0">ipc::session::sync_io::Session_adapter::m_ev_wait_func</a></div><div class="ttdeci">util::sync_io::Event_wait_func m_ev_wait_func</div><div class="ttdoc">Function (set forever in start_ops()) through which we invoke the outside event loop's async-wait fac...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00363">session_adapter.hpp:363</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_ad26ef2d688edc711821951d00101ccae"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ad26ef2d688edc711821951d00101ccae">ipc::session::sync_io::Session_adapter::m_target_channel_open_q</a></div><div class="ttdeci">Channel_open_result_q m_target_channel_open_q</div><div class="ttdoc">Queue of On_channel_func handler arg sets received from async-I/O Session_obj – meaning the Session,...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00410">session_adapter.hpp:410</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_ae6a66562d53b886d72e3edc875911b11"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae6a66562d53b886d72e3edc875911b11">ipc::session::sync_io::Session_adapter::Channel_open_result_q</a></div><div class="ttdeci">std::queue&lt; typename Channel_open_result::Ptr &gt; Channel_open_result_q</div><div class="ttdoc">Queue of Channel_open_result.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00263">session_adapter.hpp:263</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_ae7fcf6915de1764b69d0d49abb20666e"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#ae7fcf6915de1764b69d0d49abb20666e">ipc::session::sync_io::Session_adapter::init_handlers</a></div><div class="ttdeci">bool init_handlers(Task_err &amp;&amp;on_err_func_arg, On_passive_open_channel_handler &amp;&amp;on_passive_open_channel_func_arg)</div><div class="ttdoc">Compilable only when Session_obj is a Server_session variant, forwards to its method of identical for...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00474">session_adapter.hpp:474</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_aef11d364d6df923acff043cd7b3bee1d"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#aef11d364d6df923acff043cd7b3bee1d">ipc::session::sync_io::Session_adapter::m_ready_writer_chan</a></div><div class="ttdeci">util::Pipe_writer m_ready_writer_chan</div><div class="ttdoc">Write-end of IPC-pipe together with m_ready_reader_chan.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00350">session_adapter.hpp:350</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_af0b0e94d115b13c6a5b5bfde46702320"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af0b0e94d115b13c6a5b5bfde46702320">ipc::session::sync_io::Session_adapter::m_nb_task_engine</a></div><div class="ttdeci">flow::util::Task_engine m_nb_task_engine</div><div class="ttdoc">The Task_engine for m_ready_*.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00307">session_adapter.hpp:307</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_af2a771da81e49f5e38774e087c448c75"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af2a771da81e49f5e38774e087c448c75">ipc::session::sync_io::Session_adapter::m_on_channel_func_or_empty</a></div><div class="ttdeci">On_channel_func m_on_channel_func_or_empty</div><div class="ttdoc">on_passive_open_channel_func_or_empty from init_handlers() (possibly .empty() if not supplied); until...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00372">session_adapter.hpp:372</a></div></div>
<div class="ttc" id="aclassipc_1_1session_1_1sync__io_1_1Session__adapter_html_af305212e9de780ac16f4bfed4a666f7f"><div class="ttname"><a href="classipc_1_1session_1_1sync__io_1_1Session__adapter.html#af305212e9de780ac16f4bfed4a666f7f">ipc::session::sync_io::Session_adapter::m_ev_hndl_task_engine_unused</a></div><div class="ttdeci">flow::util::Task_engine m_ev_hndl_task_engine_unused</div><div class="ttdoc">The Task_engine for m_ev_wait_hndl_*, unless it is replaced via replace_event_wait_handles().</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00314">session_adapter.hpp:314</a></div></div>
<div class="ttc" id="aclassipc_1_1transport_1_1Null__peer_html"><div class="ttname"><a href="classipc_1_1transport_1_1Null__peer.html">ipc::transport::Null_peer</a></div><div class="ttdoc">Dummy type for use as a template param to Channel when either the blobs pipe or handles pipe is disab...</div><div class="ttdef"><b>Definition:</b> <a href="ipc__core_2src_2ipc_2transport_2channel_8hpp_source.html#l00999">channel.hpp:1000</a></div></div>
<div class="ttc" id="aclassipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle_html"><div class="ttname"><a href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html">ipc::util::sync_io::Asio_waitable_native_handle</a></div><div class="ttdoc">Useful if using the sync_io pattern within a user event loop built on boost.asio (optionally with flo...</div><div class="ttdef"><b>Definition:</b> <a href="asio__waitable__native__hndl_8hpp_source.html#l00080">asio_waitable_native_hndl.hpp:81</a></div></div>
<div class="ttc" id="aclassipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle_html_a7d28277f9ef090032b0483c65f79f23c"><div class="ttname"><a href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html#a7d28277f9ef090032b0483c65f79f23c">ipc::util::sync_io::Asio_waitable_native_handle::assign</a></div><div class="ttdeci">void assign(Native_handle hndl)</div><div class="ttdoc">Loads value to be returned by native_handle().</div><div class="ttdef"><b>Definition:</b> <a href="asio__waitable__native__hndl_8cpp_source.html#l00065">asio_waitable_native_hndl.cpp:65</a></div></div>
<div class="ttc" id="adetail_2util__fwd_8hpp_html"><div class="ttname"><a href="detail_2util__fwd_8hpp.html">util_fwd.hpp</a></div></div>
<div class="ttc" id="anamespaceipc_1_1session_1_1sync__io_html"><div class="ttname"><a href="namespaceipc_1_1session_1_1sync__io.html">ipc::session::sync_io</a></div><div class="ttdoc">sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::session.</div><div class="ttdef"><b>Definition:</b> <a href="session__fwd_8hpp_source.html#l00470">session_fwd.hpp:471</a></div></div>
<div class="ttc" id="anamespaceipc_1_1transport_html_a7ee4551983d9df16ec16a3139bac50e8"><div class="ttname"><a href="namespaceipc_1_1transport.html#a7ee4551983d9df16ec16a3139bac50e8">ipc::transport::Native_handle</a></div><div class="ttdeci">util::Native_handle Native_handle</div><div class="ttdoc">Convenience alias for the commonly used type util::Native_handle.</div><div class="ttdef"><b>Definition:</b> <a href="transport__fwd_8hpp_source.html#l00081">transport_fwd.hpp:81</a></div></div>
<div class="ttc" id="anamespaceipc_1_1util_1_1sync__io_html_aa0b9a3cc6bdc7dedbef4f9e06851aa24"><div class="ttname"><a href="namespaceipc_1_1util_1_1sync__io.html#aa0b9a3cc6bdc7dedbef4f9e06851aa24">ipc::util::sync_io::Event_wait_func</a></div><div class="ttdeci">Function&lt; void(Asio_waitable_native_handle *hndl_of_interest, bool ev_of_interest_snd_else_rcv, Task_ptr &amp;&amp;on_active_ev_func)&gt; Event_wait_func</div><div class="ttdoc">In sync_io pattern, concrete type storing user-supplied function invoked by pattern-implementing ipc:...</div><div class="ttdef"><b>Definition:</b> <a href="sync__io__fwd_8hpp_source.html#l00798">sync_io_fwd.hpp:800</a></div></div>
<div class="ttc" id="anamespaceipc_1_1util_html_a31e67d3a017477a04b313927e2f2c733"><div class="ttname"><a href="namespaceipc_1_1util.html#a31e67d3a017477a04b313927e2f2c733">ipc::util::Task</a></div><div class="ttdeci">flow::async::Task Task</div><div class="ttdoc">Short-hand for polymorphic function (a-la std::function&lt;&gt;) that takes no arguments and returns nothin...</div><div class="ttdef"><b>Definition:</b> <a href="util__fwd_8hpp_source.html#l00122">util_fwd.hpp:122</a></div></div>
<div class="ttc" id="anamespaceipc_1_1util_html_a5429c6225cc9a271ad8c0041d99c236b"><div class="ttname"><a href="namespaceipc_1_1util.html#a5429c6225cc9a271ad8c0041d99c236b">ipc::util::pipe_produce</a></div><div class="ttdeci">void pipe_produce(flow::log::Logger *logger_ptr, Pipe_writer *pipe)</div><div class="ttdoc">Writes a byte to the given pipe writer.</div><div class="ttdef"><b>Definition:</b> <a href="ipc__core_2src_2ipc_2util_2detail_2util_8cpp_source.html#l00067">util.cpp:67</a></div></div>
<div class="ttc" id="anamespaceipc_1_1util_html_a814272e555c0592b0caf92b7bc3d64b3"><div class="ttname"><a href="namespaceipc_1_1util.html#a814272e555c0592b0caf92b7bc3d64b3">ipc::util::pipe_consume</a></div><div class="ttdeci">void pipe_consume(flow::log::Logger *logger_ptr, Pipe_reader *pipe)</div><div class="ttdoc">Reads a byte via the given pipe reader.</div><div class="ttdef"><b>Definition:</b> <a href="ipc__core_2src_2ipc_2util_2detail_2util_8cpp_source.html#l00096">util.cpp:96</a></div></div>
<div class="ttc" id="anamespaceipc_1_1util_html_a844d5ca9c17b672644fc8d9dbe758db0"><div class="ttname"><a href="namespaceipc_1_1util.html#a844d5ca9c17b672644fc8d9dbe758db0">ipc::util::Pipe_writer</a></div><div class="ttdeci">boost::asio::writable_pipe Pipe_writer</div><div class="ttdoc">Short-hand for anonymous pipe write end.</div><div class="ttdef"><b>Definition:</b> <a href="detail_2util__fwd_8hpp_source.html#l00032">util_fwd.hpp:32</a></div></div>
<div class="ttc" id="anamespaceipc_1_1util_html_aaf368acf8243bb25de3eef4e836c15de"><div class="ttname"><a href="namespaceipc_1_1util.html#aaf368acf8243bb25de3eef4e836c15de">ipc::util::Pipe_reader</a></div><div class="ttdeci">boost::asio::readable_pipe Pipe_reader</div><div class="ttdoc">Short-hand for anonymous pipe read end.</div><div class="ttdef"><b>Definition:</b> <a href="detail_2util__fwd_8hpp_source.html#l00035">util_fwd.hpp:35</a></div></div>
<div class="ttc" id="anamespaceipc_html_aa3192e586cc45d3e7c22463bf2760f89"><div class="ttname"><a href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89">ipc::Error_code</a></div><div class="ttdeci">flow::Error_code Error_code</div><div class="ttdoc">Short-hand for flow::Error_code which is very common.</div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00298">common.hpp:298</a></div></div>
<div class="ttc" id="anamespaceipc_html_aa455c7f045059736578ca275fc1a851f"><div class="ttname"><a href="namespaceipc.html#aa455c7f045059736578ca275fc1a851f">ipc::Function</a></div><div class="ttdeci">flow::Function&lt; Signature &gt; Function</div><div class="ttdoc">Short-hand for polymorphic functor holder which is very common. This is essentially std::function.</div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00302">common.hpp:302</a></div></div>
<div class="ttc" id="asession__fwd_8hpp_html"><div class="ttname"><a href="session__fwd_8hpp.html">session_fwd.hpp</a></div></div>
<div class="ttc" id="astructipc_1_1session_1_1Client__app_html"><div class="ttname"><a href="structipc_1_1session_1_1Client__app.html">ipc::session::Client_app</a></div><div class="ttdoc">An App that is used as a client in at least one client-server IPC split.</div><div class="ttdef"><b>Definition:</b> <a href="app_8hpp_source.html#l00184">app.hpp:185</a></div></div>
<div class="ttc" id="astructipc_1_1session_1_1Server__app_html"><div class="ttname"><a href="structipc_1_1session_1_1Server__app.html">ipc::session::Server_app</a></div><div class="ttdoc">An App that is used as a server in at least one client-server IPC split.</div><div class="ttdef"><b>Definition:</b> <a href="app_8hpp_source.html#l00205">app.hpp:206</a></div></div>
<div class="ttc" id="astructipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result_html"><div class="ttname"><a href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html">ipc::session::sync_io::Session_adapter::Channel_open_result</a></div><div class="ttdoc">Set of result arg values from a successful passive-channel-open from a Session_obj invoking On_channe...</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00246">session_adapter.hpp:247</a></div></div>
<div class="ttc" id="astructipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result_html_a2cd3ea9543f4300d3c6fe47ada8798ee"><div class="ttname"><a href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a2cd3ea9543f4300d3c6fe47ada8798ee">ipc::session::sync_io::Session_adapter::Channel_open_result::m_channel</a></div><div class="ttdeci">Channel_obj m_channel</div><div class="ttdoc">Result 1/2 given about to be given to m_on_channel_func_or_empty.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00256">session_adapter.hpp:256</a></div></div>
<div class="ttc" id="astructipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result_html_a5868da8b3a718d43af3d3b7a5c611cd8"><div class="ttname"><a href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a5868da8b3a718d43af3d3b7a5c611cd8">ipc::session::sync_io::Session_adapter::Channel_open_result::m_mdt_reader_ptr</a></div><div class="ttdeci">Mdt_reader_ptr m_mdt_reader_ptr</div><div class="ttdoc">Result 2/2 given about to be given to m_on_channel_func_or_empty.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00259">session_adapter.hpp:259</a></div></div>
<div class="ttc" id="astructipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result_html_a66d9fad46eb4c59bee360b92d1763b92"><div class="ttname"><a href="structipc_1_1session_1_1sync__io_1_1Session__adapter_1_1Channel__open__result.html#a66d9fad46eb4c59bee360b92d1763b92">ipc::session::sync_io::Session_adapter::Channel_open_result::Ptr</a></div><div class="ttdeci">boost::movelib::unique_ptr&lt; Channel_open_result &gt; Ptr</div><div class="ttdoc">Short-hand for pointer wrapper around a *this.</div><div class="ttdef"><b>Definition:</b> <a href="session__adapter_8hpp_source.html#l00251">session_adapter.hpp:251</a></div></div>
<div class="ttc" id="astructipc_1_1util_1_1Native__handle_html"><div class="ttname"><a href="structipc_1_1util_1_1Native__handle.html">ipc::util::Native_handle</a></div><div class="ttdoc">A monolayer-thin wrapper around a native handle, a/k/a descriptor a/k/a FD.</div><div class="ttdef"><b>Definition:</b> <a href="native__handle_8hpp_source.html#l00062">native_handle.hpp:63</a></div></div>
<div class="ttc" id="async__io__fwd_8hpp_html"><div class="ttname"><a href="sync__io__fwd_8hpp.html">sync_io_fwd.hpp</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu May 2 2024 23:56:38 for Flow-IPC by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
